package org.apache.flink.runtime.client;

import java.util.concurrent.CompletableFuture;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.api.common.ConsumerID;
import org.apache.flink.api.common.ConsumingStatus;
import org.apache.flink.api.common.ResourceStatus;
import org.apache.flink.runtime.allocation.ResourceAllocationStatistics;

/**
 *  A client that is scoped to a specific 资源消费. 
 */
@PublicEvolving
public interface ConsumeClient {
	
    /** Cancels the associated job. */
    CompletableFuture<Void> cancel();

    /** Returns the {@link ConsumerID} that uniquely identifies the consuming this client is scoped to. */
    ConsumerID getConsumerID();

    /** Requests the {@link ConsumingStatus} of the associated job. */
    CompletableFuture<ConsumingStatus> getConsumingStatus();
    
    // 资源消费状态
    CompletableFuture<ResourceStatus> getResourceStatus();
    
    // 资源分配统计
    CompletableFuture<ResourceAllocationStatistics> getResourceAllocationStatistics();

}
